-- attack_and_burn
-- create by dengc
-- 造成等于攻击者攻击力的伤害,并附加等同于攻击者攻击力的灼烧伤害

return {
    apply = function(source, target, skillId, round, para, extra)
        -- 获得攻击方的攻击力
        local damage = source:getAttack();

        -- 增加命中动作
        SkillM.getSequence(target):hit(source, target, skillId);

        -- 伤害
        CombatM.receiveDamage(source, target, damage, skillId, extra);

        -- 灼烧
        local propId = PropM.getPropId("burn");

        -- 灼烧持续回合
        local lastRound = para[1];

        -- 减益状态
        local effectRound = CombatM.getRound() + lastRound;
        local arr = ({ propId, 1, damage, effectRound, });

        local condition = {
            ["prop"] = arr,
            ["end_round"] = effectRound,
        };

        -- 附加状态
        CombatStatusM.applyStatus(target, "burn", condition);

        -- 作用目标
        return { target, };
    end,

    parse = function(desc)
        local arr = desc;
        return { tonumber(arr), };
    end,

    -- 解析技能描述
    parseDesc = function(source, skillId, desc, para)
        return desc;
    end,
};
